package cn.com.xf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.xf.dao.TblCheckHolidayDAO;
import cn.com.xf.domain.TblCheckHoliday;
import cn.com.xf.service.HolidayService;

@Service
public class HolidayServiceImpl implements HolidayService {

	@Autowired
	private TblCheckHolidayDAO checkHolidayDAO;
	
	@Override
	public TblCheckHoliday selectHolidayById(Long id) {
		return checkHolidayDAO.selectByPrimaryKey(id);
	}

	@Override
	public int insertHoliday(TblCheckHoliday holiday) {
		checkHolidayDAO.insert(holiday);
		return 0;
	}

	@Override
	public int deleteHoliday(Long id) {
		return checkHolidayDAO.deleteByPrimaryKey(id);
	}

	@Override
	public int updateHoliday(TblCheckHoliday holiday) {
		return checkHolidayDAO.updateByPrimaryKey(holiday);
	}

	@Override
	public List<TblCheckHoliday> selectHoliday(int begin, int pageSize,
			String siteid) {
		return checkHolidayDAO.select(begin, pageSize, siteid);
	}

	@Override
	public int selectHolidayCount(String siteid) {
		return checkHolidayDAO.selectCount(siteid);
	}

}
